package com.tgu.home_action.pojo;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

@Data
@ApiModel(description = "人脸比对记录")
public class Face implements Serializable {
    @ApiModelProperty("ID")
    private Integer id;
    @ApiModelProperty("照片地址")
    private String imgUrl;
    @ApiModelProperty("时间")
    private Timestamp time;
    @ApiModelProperty("比对结果")
    private Float result;
    @ApiModelProperty("志愿者ID")
    private Integer volunteerId;
    @ApiModelProperty("老人ID")
    private Integer oldManId;
    @ApiModelProperty("老人信息(含案件信息)")
    private OldMan oldMan;
    @ApiModelProperty("状态(1为比对结果小于80%，2为大于等于80%但家属未确认，3为确认成功，4为确认失败)")
    private Short state;
    @ApiModelProperty("志愿者")
    private Volunteer volunteer;
    @JsonBackReference("当前页")
    @ApiModelProperty("当前页")
    private Integer pageNo;
    @JsonBackReference("每页条数")
    @ApiModelProperty("每页条数")
    private Integer pageSize;
    /**
     * 分页查询前面的数据
     */
    @JsonIgnore
    private Integer startSize;

    public Face(String imgUrl, Timestamp time, Float result, Integer volunteerId, Integer oldManId, OldMan oldMan, Short state) {
        this.imgUrl = imgUrl;
        this.time = time;
        this.result = result;
        this.volunteerId = volunteerId;
        this.oldManId = oldManId;
        this.oldMan = oldMan;
        this.state = state;
    }

    public Face() {
    }
}
